//
//  MSAppVersionManager.m
//  MSJD
//
//  Created by 箭军刘 on 2018/12/23.
//  Copyright © 2018 xiangbo. All rights reserved.
//

#import "MSAppVersionManager.h"
#import "MSLoginDataSource.h"

static NSString *const kAPPVersionDataKey = @"kAPPVersionDataKey";

@implementation MSAppVersionManager

+ (void)downAppVersionData {
    
    [MSLoginDataSource queryAppReviewStatus:^(NSDictionary * _Nonnull responseInfo) {
        NSInteger status = 0;
        if (responseInfo[@"status"]) {
            status = [responseInfo[@"status"] integerValue];
        }
        [[NSUserDefaults standardUserDefaults] setInteger:status forKey:kAPPVersionDataKey];
        [[NSUserDefaults standardUserDefaults] synchronize];
    } failure:^(NSError * _Nonnull error) {
        
    }];
}

+ (NSInteger)isReview {
    return [[NSUserDefaults standardUserDefaults] integerForKey:kAPPVersionDataKey];
}

@end
